#include "DGL3ProgramEnums.inc"

#ifdef VERTEX_SHADER
layout(location = GE_VA_Position) in vec4 aPosition;

out vec2 vUV;

void main()
{
	gl_Position = vec4(aPosition.xy, 0.5f, 1.0f);
	vUV = aPosition.zw;
}

#endif

//---------------------------

#ifdef FRAGMENT_SHADER

in vec2 vUV;
uniform sampler2D uTexture;
layout(location = 0) out vec4 fragColor;

void main()
{
	vec4 color = texture2D(uTexture, vUV);
	if (color.r == 0.0)
		discard;
    fragColor = color;
}

#endif